package cn.tmpan.project.model.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author tieMinPan
 * @Desc: Description
 * @date 2019-12-13 16:25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class TestDto {
    @NotBlank(message = "姓名不能为空")
    @Length(min = 5, message = "长度最低为5位")
    private String name;
    @NotNull
    @Min(value = 20, message = "年龄最小为20岁")
    private Integer age;
}
